<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<div class="tips" *ngIf="type === dataMap.Resource_Type.DWS_Table.value">
  <i
    style="display: inline-block; margin-right: 4px;vertical-align: super;"
    lv-icon="lv-icon-status-info"
    lvColorState="true"
    class="type-icon"
  ></i>
  <span style="display: inline-block; width: 96%; vertical-align: middle">
    {{ 'protection_dws_gds_backup_type_tips_label' | i18n }}
  </span>
</div>
<aui-select-protect-objects
  [title]="title"
  [allTableData]="allTableData"
  [columns]="columns"
  [resourceData]="selectionData"
  (updateTable)="updateTable($event)"
  (dataChange)="dataChange($event)"
>
</aui-select-protect-objects>
<lv-form [formGroup]="formGroup" class="aui-gutter-column-md">
  <lv-form-item>
    <lv-form-label lvRequired>
      {{ 'protection_backup_metadata_path_label' | i18n }}
      <i
        lv-icon="aui-icon-help"
        lv-tooltip="{{
          'protection_register_dws_metapath_path_tip_label' | i18n
        }}"

        class="configform-constraint"
        lvColorState="true"
      ></i>
    </lv-form-label>
    <lv-form-control [lvErrorTip]="pathErrorTip">
      <textarea
        rows="5"
        formControlName="path"
        lv-input
        style="resize: vertical; width: 510px;"
        [lvAutosize]="{ minRows: 4, maxRows: 8 }"
        placeholder="{{ 'protection_dws_metadata_path_tips_label' | i18n }}"
      ></textarea>
    </lv-form-control>
  </lv-form-item>
  <ng-container *ngIf="false">
    <lv-form-item>
      <lv-form-label lvRequired>
        {{ 'common_backup_mode_label' | i18n }}
        <i
          lv-icon="aui-icon-help"
          lv-tooltip="{{ 'protection_dws_backup_type_tips_label' | i18n }}"

          class="configform-constraint"
          lvColorState="true"
        ></i>
      </lv-form-label>
      <lv-form-control [lvErrorTip]="baseUtilService.requiredErrorTip">
        <lv-select
          formControlName="backup"
          [lvOptions]="backupOptions"
          lvValueKey="value"
        >
        </lv-select>
      </lv-form-control>
    </lv-form-item>
  </ng-container>
</lv-form>
